/**
 * 
 */
package com.oauth.components.client.ui;

import java.util.Iterator;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HasWidgets;
import com.google.gwt.user.client.ui.Widget;

/**
 * @author asanthan
 * 
 */
public class HorizontalFlowPanel extends Composite implements HasWidgets {

	private static HorizontalFlowPanelUiBinder uiBinder = GWT
			.create(HorizontalFlowPanelUiBinder.class);

	interface HorizontalFlowPanelUiBinder extends UiBinder<FlowPanel, HorizontalFlowPanel> {
	}

	@UiField
	FlowPanel flowPanel;

	public HorizontalFlowPanel() {
		initWidget(uiBinder.createAndBindUi(this));
	}

	/**
	 * @param pWidget
	 * @see com.google.gwt.user.client.ui.FlowPanel#add(com.google.gwt.user.client.ui.Widget)
	 */
	public void add(Widget pWidget) {
		pWidget.getElement().getStyle().setProperty("display", "inline");
		flowPanel.add(pWidget);
	}

	@Override
	public void clear() {
		flowPanel.clear();

	}

	@Override
	public Iterator<Widget> iterator() {
		return flowPanel.iterator();
	}

	@Override
	public boolean remove(Widget pArg0) {
		return flowPanel.remove(pArg0);
	}

}
